"use strict";

/**
 * @auther wtfssd
 * Created by wtfssd on 2017/11/9
 */
import * as React from 'react'
import {OrderHeaderItemProps} from "./index";
import {commonStyles} from "../assets/styles/common";
import MyIcon from "./icon";
import MyText from "./MyText";
import {orderHeaderItemStyles} from "../assets/styles/orderItem";

const {View, Text} = require('react-native');
const {connect} = require('react-redux');

class OrderHeaderItem extends React.Component<OrderHeaderItemProps, any> {
    static defaultProps = {
        style: null,
        icon: '',
        text: '',
        color: '',
    };

    render() {
        const {icon, text, color, style} = this.props;
        return (
            <View style={[commonStyles.flexRow, orderHeaderItemStyles.container,style]}>
                <MyIcon name={icon} color={color}/>
                <MyText color={color} fontSize={14} style={orderHeaderItemStyles.text}>{text}</MyText>
            </View>
        );
    }
}


export default OrderHeaderItem;